package com.jbm.jbmsupplier.util;

import java.io.Serializable;
import java.sql.Date;

/**
 * Created by lyh on 2017-03-15.
 */


public class ExProductEntity extends com.jbm.jbmsupplier.util.ICtrl implements Serializable {
    private static final long serialVersionUID = -5449459622260273890L;
    private int expId;
    private String name;  //名称
    private Integer amount;  //积分数量
    private Integer sum;    //价值金额
    private Date expireDate;  //过期时间
    private Integer status;   //状态1有效 0失效
    private String picpath;  //图片地址
    private Integer ectype;   //待发放商品类别 枚举exchangetype
    private Integer expAmount;   //待发放商品数量
    private Integer curAmount;   //现有商品数量
    private Integer isdel; //是否删除
    private byte[]  picByte;
    private Integer platformRatio;
    public  ExProductEntity(){}
    public  ExProductEntity(String method,int expId,String name,Integer amount,Integer sum, Date expireDate,Integer status,String picpath,int start,int  pagesize){
        this.method=method;
        this.expId=expId;
        this.name=name;
        this.amount=amount;
        this.sum=sum;
        this.expireDate=expireDate;
        this.status=status;
        this.picpath=picpath;
        this.start=start;
        this.pagesize=pagesize;
    }
    public  ExProductEntity(boolean back, String errorinfo)
    {
        this.back = back;
        this.errorinfo = errorinfo;
    }


    public int getExpId() {
        return expId;
    }

    public void setExpId(int expId) {
        this.expId = expId;
    }


    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }


    public Integer getAmount() {
        return amount;
    }

    public void setAmount(Integer amount) {
        this.amount = amount;
    }


    public Integer getSum() {
        return sum;
    }

    public void setSum(Integer sum) {
        this.sum = sum;
    }


    public Date getExpireDate() {
        return expireDate;
    }

    public void setExpireDate(Date expireDate) {
        this.expireDate = expireDate;
    }


    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }


    public Integer getEctype() {
        return ectype;
    }

    public void setEctype(Integer ectype) {
        this.ectype = ectype;
    }


    public Integer getExpAmount() {
        return expAmount;
    }

    public void setExpAmount(Integer expAmount) {
        this.expAmount = expAmount;
    }

    public Integer getCurAmount() {
        return curAmount;
    }

    public void setCurAmount(Integer curAmount) {
        this.curAmount = curAmount;
    }

    public Integer getIsdel() {
        return isdel;
    }

    public void setIsdel(Integer isdel) {
        this.isdel = isdel;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        ExProductEntity that = (ExProductEntity) o;

        if (expId != that.expId) return false;
        if (amount != null ? !amount.equals(that.amount) : that.amount != null) return false;
        if (expireDate != null ? !expireDate.equals(that.expireDate) : that.expireDate != null) return false;
        if (name != null ? !name.equals(that.name) : that.name != null) return false;
        if (status != null ? !status.equals(that.status) : that.status != null) return false;
        if (sum != null ? !sum.equals(that.sum) : that.sum != null) return false;
        if (expAmount != null ? !expAmount.equals(that.expAmount) : that.expAmount != null) return false;
        if (ectype != null ? !ectype.equals(that.ectype) : that.ectype != null) return false;
        if (curAmount != null ? !curAmount.equals(that.curAmount) : that.curAmount != null) return false;
        if (isdel != null ? !isdel.equals(that.isdel) : that.isdel != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = expId;
        result = 31 * result + (name != null ? name.hashCode() : 0);
        result = 31 * result + (amount != null ? amount.hashCode() : 0);
        result = 31 * result + (sum != null ? sum.hashCode() : 0);
        result = 31 * result + (expireDate != null ? expireDate.hashCode() : 0);
        result = 31 * result + (status != null ? status.hashCode() : 0);
        result = 31 * result + (expAmount != null ? expAmount.hashCode() : 0);
        result = 31 * result + (ectype != null ? ectype.hashCode() : 0);
        result = 31 * result + (curAmount != null ? curAmount.hashCode() : 0);
        result = 31 * result + (isdel != null ? isdel.hashCode() : 0);

        return result;
    }


    public String getPicpath() {
        return picpath;
    }

    public void setPicpath(String picpath) {
        this.picpath = picpath;
    }


    public byte[] getPicByte() {
        return picByte;
    }

    public void setPicByte(byte[] picByte) {
        this.picByte = picByte;
    }


    public Integer getPlatformRatio() {
        return platformRatio;
    }

    public void setPlatformRatio(Integer platformRatio) {
        this.platformRatio = platformRatio;
    }
}
